import type { Theme } from '../types/theme';

// 活力橙主题（新的默认主题）
export const vibrancyOrangeTheme: Theme = {
  id: 'vibrancy-orange',
  name: '活力橙',
  isDark: false,
  colors: {
    primary: {
      50: '#fff7ed',
      100: '#ffedd5',
      200: '#fed7aa',
      300: '#fdba74',
      400: '#fb923c',
      500: '#f97316',
      600: '#ea580c',
      700: '#c2410c',
      800: '#9a3412',
      900: '#7c2d12',
    },
    secondary: {
      50: '#f9fafb',
      100: '#f3f4f6',
      200: '#e5e7eb',
      300: '#d1d5db',
      400: '#9ca3af',
      500: '#6b7280',
      600: '#4b5563',
      700: '#374151',
      800: '#1f2937',
      900: '#111827',
    },
    success: '#10b981',
    warning: '#f59e0b',
    error: '#ef4444',
    info: '#f97316',
    background: {
      primary: '#ffffff',
      secondary: '#f9fafb',
      tertiary: '#f3f4f6',
    },
    text: {
      primary: '#111827',
      secondary: '#6b7280',
      muted: '#9ca3af',
    },
    border: {
      light: '#f3f4f6',
      default: '#e5e7eb',
      dark: '#d1d5db',
    }
  }
};

// 科技蓝主题
export const techBlueTheme: Theme = {
  id: 'tech-blue',
  name: '科技蓝',
  isDark: false,
  colors: {
    primary: {
      50: '#eff6ff',
      100: '#dbeafe',
      200: '#bfdbfe',
      300: '#93c5fd',
      400: '#60a5fa',
      500: '#3b82f6',
      600: '#2563eb',
      700: '#1d4ed8',
      800: '#1e40af',
      900: '#1e3a8a',
    },
    secondary: {
      50: '#f8fafc',
      100: '#f1f5f9',
      200: '#e2e8f0',
      300: '#cbd5e1',
      400: '#94a3b8',
      500: '#64748b',
      600: '#475569',
      700: '#334155',
      800: '#1e293b',
      900: '#0f172a',
    },
    success: '#06d6a0',
    warning: '#ffd60a',
    error: '#f72585',
    info: '#4cc9f0',
    background: {
      primary: '#ffffff',
      secondary: '#f8fafc',
      tertiary: '#f1f5f9',
    },
    text: {
      primary: '#0f172a',
      secondary: '#475569',
      muted: '#64748b',
    },
    border: {
      light: '#f1f5f9',
      default: '#e2e8f0',
      dark: '#cbd5e1',
    }
  }
};

// 深色主题
export const darkTheme: Theme = {
  id: 'dark',
  name: '深色模式',
  isDark: true,
  colors: {
    primary: {
      50: '#1e3a8a',
      100: '#1e40af',
      200: '#1d4ed8',
      300: '#2563eb',
      400: '#3b82f6',
      500: '#60a5fa',
      600: '#93c5fd',
      700: '#bfdbfe',
      800: '#dbeafe',
      900: '#eff6ff',
    },
    secondary: {
      50: '#0f172a',
      100: '#1e293b',
      200: '#334155',
      300: '#475569',
      400: '#64748b',
      500: '#94a3b8',
      600: '#cbd5e1',
      700: '#e2e8f0',
      800: '#f1f5f9',
      900: '#f8fafc',
    },
    success: '#06d6a0',
    warning: '#ffd60a',
    error: '#f72585',
    info: '#4cc9f0',
    background: {
      primary: '#0f172a',
      secondary: '#1e293b',
      tertiary: '#334155',
    },
    text: {
      primary: '#f8fafc',
      secondary: '#cbd5e1',
      muted: '#94a3b8',
    },
    border: {
      light: '#334155',
      default: '#475569',
      dark: '#64748b',
    }
  }
};

// 绿色主题
export const greenTheme: Theme = {
  id: 'green',
  name: '自然绿',
  isDark: false,
  colors: {
    primary: {
      50: '#f0fdf4',
      100: '#dcfce7',
      200: '#bbf7d0',
      300: '#86efac',
      400: '#4ade80',
      500: '#22c55e',
      600: '#16a34a',
      700: '#15803d',
      800: '#166534',
      900: '#14532d',
    },
    secondary: {
      50: '#fafaf9',
      100: '#f5f5f4',
      200: '#e7e5e4',
      300: '#d6d3d1',
      400: '#a8a29e',
      500: '#78716c',
      600: '#57534e',
      700: '#44403c',
      800: '#292524',
      900: '#1c1917',
    },
    success: '#22c55e',
    warning: '#eab308',
    error: '#dc2626',
    info: '#0ea5e9',
    background: {
      primary: '#ffffff',
      secondary: '#fafaf9',
      tertiary: '#f5f5f4',
    },
    text: {
      primary: '#1c1917',
      secondary: '#57534e',
      muted: '#78716c',
    },
    border: {
      light: '#f5f5f4',
      default: '#e7e5e4',
      dark: '#d6d3d1',
    }
  }
};

export const themes: Theme[] = [
  vibrancyOrangeTheme,
  techBlueTheme,
  darkTheme,
  greenTheme,
];

// 设置活力橙为默认主题
export const defaultTheme = vibrancyOrangeTheme;

export const getThemeById = (id: string): Theme => {
  return themes.find(theme => theme.id === id) || defaultTheme;
};